home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1990 January & February / rerun-1990-01-02.d64 / traffic jam (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  131 lines

  1. 10 rem traffic jam!/(c) 1989
  2. 20 clr:dim u,j,r,sc,v,s,sy,tm,v
  3. 30 restore:forx=.to6:readh1(x),n1(x):next:gosub560
  4. 40 poke53248+21,.:poke53281,.:poke53280,.:printchr$(147)chr$(142)chr$(8)
  5. 50 poke53272,31:poke214,10:print:printtab(15)"working ..."
  6. 60 forx=12288to12800:readd:pokex,d:next:forx=49223to49572:readd:pokex,d:next
  7. 70 print"[147]":poke214,4:print:print""tab(8)"run magazine presents"
  8. 80 print""tab(2)"[213][178][201][178][192][201] [213][192][201][178][192][174][178][192][174][213][178][201][213][192][201]  [213][178][201][213][192][201][213][201][213][201]"
  9. 90 printtab(2)"[154] [194] [194][192][177][201][194][192][194][194][192] [194][192]  [194] [194]     [194] [194][192][194][194][202][203][194]"
  10. 100 printtab(2)"[159] [177] [177]  [177][177] [177][177]  [177]  [202][177][203][202][192][203] [202][192][203] [177] [177][177]  [177]"
  11. 110 print""tab(6)"[153](c) 1989 jeffrey d. panici"
  12. 120 print""tab(12)"for the c-64!":print""tab(8)"[152]joystick in port-two!"
  13. 130 print""tab(5)"press fire[160]button to begin!":j=56320:waitj,16,16
  14. 140 print"[147]":printchr$(147)"[144]       [146]traffic [154]jam! - [153](c) 1989[144]         [146]"
  15. 150 print"[151][171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]   [171]"
  16. 160 print"[151][171][195][195][195][195][179]   [171][195][195][195][179]   [171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  17. 170 print"[151][171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]   [171]"
  18. 180 print"[151][171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]   [171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  19. 190 print"[151][171][195][179]   [171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]   [171]"
  20. 200 print"[151][171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]   [171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  21. 210 print"[151][171][195][195][195][179]   [171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179] score [154]0"
  22. 220 rem initilazation
  23. 230 u=1:t=2:h=3:sc=.:v=53248:s=54272:sx=45:sy=828:restore
  24. 240 forx=.to5:readh1(x),n1(x):next
  25. 250 tm=49223:p=2040:b=192:w1=peek(v+30):w2=peek(v+31)andu:lv=1
  26. 260 forx=.to24:pokes+x,.:next:pokes+6,240:pokes+24,15:sys49223
  27. 270 poke2040,192:poke2040+u,193:pokev+21,255:pokev,65:pokev+1,230
  28. 280 poke2040+2,194:poke2040+3,195:poke2040+4,196:poke2040+5,197:poke2040+6,198
  29. 290 poke2040+7,199
  30. 300 pokev+2,110:pokev+3,87:pokev+4,210:pokev+5,110:pokev+6,98:pokev+7,136
  31. 310 pokev+8,156:pokev+9,158:pokev+10,56:pokev+11,182:pokev+12,179:pokev+13,207
  32. 320 pokev+14,70:pokev+15,63:ti$="000000"
  33. 330 w1=peek(v+30):w1=peek(v+30):w1=peek(v+30):w2=peek(v+31):w2=peek(v+32)
  34. 340 rem main loop
  35. 350 forx=1tolv:sys49408:next:w1=peek(v+30):ifw1anduthen400
  36. 360 w2=peek(v+31):ifw2anduthen430
  37. 370 print" ";:printval(ti$):ifval(ti$)>40-lvthen430
  38. 380 iflv=25thenlv=1
  39. 390 goto340
  40. 400 ifw1=129thengoto520
  41. 410 goto430
  42. 420 goto340
  43. 430 rem game over
  44. 440 pokev+21,.:forx=.to24:pokes+x,.:next:pokes+24,15:pokes+5,80:pokes+12,160:pokes+6,255
  45. 450 pokes+13,252:pokes+4,17
  46. 460 fori=254to50step-4:pokes+i,i:forj=1to5:next:next
  47. 470 pokes+1,10:pokes+8,1:pokes+5,112:pokes+6,252:pokes+4,129:pokes+11,129
  48. 480 forp=1to1300:next:pokes+24,.
  49. 490 print"[147]":printtab(13)"game over":print""tab(12)"[154]final score
  50. 500 [153]""[163]15);sc:[153]"print       better luck next time!!!"
  51. 510 [129]p[178]1[164]3000:[130]:[138]70
  52. 520 sc[178]sc[170]100[172]lv:[129]x[178].[164]24:[151]s[170]x,.:[130]:[158]49559:[141]1240:[151]214,21:[153]
  53. 530 [153][163]34);sc:lv[178]lv[170]2:[153]"    ":[137]260
  54. 540 [131] 25,30,33,135,42,62,50,60,42,62,50,60,0,0
  55. 550 [143] char data
  56. 560 [151]56334,.:[151]1,51:[151]781,9:[151]782,.:[151]90,.:[151]91,216:[151]88,.
  57. 570 [151]89,64:[158]41964:[151]1,55:[151]56334,1:[151]54272,216:[151]53272,30
  58. 580 [135]a:[139]a[178][171]1[167][142]
  59. 590 [129]x[178].[164]7:[135]d:[151]14336[170]a[172]8[170]x,d:[130]:[151]53272,31:[137]580
  60. 600 [131] 107,,127,128,128,128,127,,.
  61. 610 [131] 67,,255,,,,255,,.
  62. 620 [131] 115,,254,1,1,1,254,,.
  63. 630 [131] -1
  64. 640 [143] sprite data
  65. 650 [131] ,,,,,,,,,,,,,,.
  66. 660 [131] ,56,,,56,,,16,,,120,,,20,.
  67. 670 [131] ,16,,,40,,,36,,,,,,,.
  68. 680 [131] ,,,,,,,,,,,,,,.
  69. 690 [131] ,,,,,,,,,,,,,,.
  70. 700 [131] ,,,,,,,,,,62,,,18,.
  71. 710 [131] ,9,,,60,255,224,48,138,252,47,63,226,41,161
  72. 720 [131] 145,60,255,63,7,,224,,,,,,,,.
  73. 730 [131] ,,,,,,,,,,,,,,.
  74. 740 [131] ,,,,,,,,,,,,,112,.
  75. 750 [131] 3,168,,29,88,63,234,168,96,21,88,243,159,232,244
  76. 760 [131] 193,152,254,127,56,3,128,224,,,,,,,.
  77. 770 [131] ,,,,,,,,,,,,,,.
  78. 780 [131] ,,,,,,,,,,,,,,.
  79. 790 [131] ,,,62,,,18,,,9,,,60,255,224
  80. 800 [131] 48,138,252,47,63,226,41,161,145,60,255,63,7,,224
  81. 810 [131] ,,,,,,,,,,,,,,.
  82. 820 [131] ,,,,,,,,,,,,,,.
  83. 830 [131] ,,,,,,112,,3,168,,29,88,63,234
  84. 840 [131] 168,96,21,88,243,159,232,244,193,152,254,127,56,3,128
  85. 850 [131] 224,,,,,,,,,,,,,,.
  86. 860 [131] ,,,,,,,,,,,,,,.
  87. 870 [131] ,,,,,,,,,,,62,,,18
  88. 880 [131] ,,9,,,60,255,224,48,138,252,47,63,226,41
  89. 890 [131] 161,145,60,255,63,7,,224,,,,,,,.
  90. 900 [131] ,,,,,,,,,,,,,,.
  91. 910 [131] ,,,,,,,,,,,,,,112
  92. 920 [131] ,3,168,,29,88,63,234,168,96,21,88,243,159,232
  93. 930 [131] 244,193,152,254,127,56,3,128,224,,,,,,.
  94. 940 [131] ,,,,,,,,,,,,,,.
  95. 950 [131] ,,126,,,255,,1,159,128,3,15,192,6,7
  96. 960 [131] 224,12,3,240,24,1,248,55,28,252,119,28,248,16,.
  97. 970 [131] 136,16,240,216,16,240,216,16,240,200,16,240,136,16,240
  98. 980 [131] 152,31,255,224,,,,,,,,,,,,,,7
  99. 990 [143] machine language interrupt
  100. 1000 [131] 120,169,84,141,20,3,169,192,141,21,3,88,96,173,148
  101. 1010 [131] 192,208,40,174,149,192,232,224,104,208,2,162,,189,150
  102. 1020 [131] 192,141,,212,232,189,150,192,141,1,212,232,189,150,192
  103. 1030 [131] 141,4,212,232,189,150,192,141,148,192,142,149,192,206,148
  104. 1040 [131] 192,32,,193,32,30,193,76,49,234,169,234,141,21,3
  105. 1050 [131] 88,96,7,35,143,10,17,15,48,11,17,15,143,12,17
  106. 1060 [131] 15,210,15,17,15,195,16,17,15,210,15,17,16,143,12
  107. 1070 [131] 17,15,210,15,17,15,24,14,17,15,48,11,17,15,195
  108. 1080 [131] 16,17,15,210,15,17,15,143,12,17,15,143,10,17,15
  109. 1090 [131] 48,11,17,15,143,12,17,15,210,15,17,15,195,16,17
  110. 1100 [131] 15,210,15,17,15,143,12,17,15,31,21,17,15,209,18
  111. 1110 [131] 17,15,165,31,17,15,49,28,17,15,96,22,17,15,31
  112. 1120 [131] 21,17,15,102,102,238,2,208,206,4,208,238,6,208,206
  113. 1130 [131] 8,208,238,10,208,206,12,208,232,224,255,208,251,162,.
  114. 1140 [131] 96,30,193,173,,173,,220,74,176,3,206,1,208,74
  115. 1150 [131] 176,3,238,1,208,74,176,42,173,,208,208,31,173,16
  116. 1160 [131] 208,41,1,208,16,173,16,208,9,1,141,16,208,169,80
  117. 1170 [131] 141,,208,96,234,234,173,16,208,41,254,141,16,208,206
  118. 1180 [131] ,208,96,234,234,74,176,32,238,,208,240,30,169,80
  119. 1190 [131] 205,,208,208,20,173,16,208,41,1,240,13,173,16,208
  120. 1200 [131] 41,254,141,16,208,169,,141,,208,96,234,234,173,16
  121. 1210 [131] 208,9,1,141,16,208,96,234,234,96,96,96,96,32,30
  122. 1220 [131] 193,32,30,193,96,,120,169,49,141,20,3,169,234,141
  123. 1230 [131] 21,3,88,96,102
  124. 1240 [143] music routine
  125. 1250 [129]x[178].[164]24:[151]s[170]x,.:[130]
  126. 1260 [151]s[170]24,15:[151]s[170]5,85:[151]s[170]6,85:[151]s[170]4,33:[151]s[170]24,15
  127. 1270 [129]x[178].[164]5:[151]s[170]1,h1(x):[151]s,n1(x)
  128. 1280 [139]h1(x)[178]50[167][129]t[178].[164]400:[130]
  129. 1290 [129]t[178].[164]200:[130]:[130]:[129]x[178].[164]24:[151]s[170]24,.:[130]:[151]s[170]6,240:[151]s[170]24,15
  130. 1300 [142]
  131.